
:root {
    --primary-color: #4a90e2;
    --success-color: #50c97d;
    --gradient-start: #6c5ce7;
    --gradient-end: #4a90e2;
}

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.upload-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.preview-area {
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.preview-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
    rgba(76, 81, 191, 0.1) 25%,
    transparent 25%,
    transparent 50%,
    rgba(76, 81, 191, 0.1) 50%,
    rgba(76, 81, 191, 0.1) 75%,
    transparent 75%,
    transparent
    );
    background-size: 60px 60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.preview-area:hover {
    border-color: var(--gradient-end);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.2);
}

.preview-area:hover::before {
    opacity: 0.3;
    animation: dragEffect 2s linear infinite;
}

.preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin-top: 1.5rem;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.upload-progress {
    height: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(233, 236, 239, 0.8);
    margin: 1.5rem 0;
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%);
    transition: width 0.4s ease-out;
}

.upload-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    background: linear-gradient(135deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.3);
}

.result-card {
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(245, 247, 250, 0.95) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-top: 2rem;
}

.analysis-panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.analysis-panel.visible {
    opacity: 1;
    max-height: 1000px;
}

@keyframes dragEffect {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

.floating-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.result-badge {
    background: linear-gradient(135deg,
    var(--success-color) 0%,
    #3ac569 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* 核心按钮样式 */
.ai-btn {
    /* 布局 */
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* 文字与图标 */
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

/* 科技感风格 */
.glow-btn {
    background: linear-gradient(135deg,
    #6c5ce7 0%,
    #4a90e2 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.glow-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.5);
    animation: btnGlow 1.5s infinite alternate;
}

.glow-btn i {
    font-size: 1.3em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 加载状态 */
.glow-btn.loading {
    padding-right: 3.5rem;
}

.glow-btn.loading::after {
    content: "";
    position: absolute;
    right: 1.2rem;
    width: 1.4rem;
    height: 1.4rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes btnGlow {
    from {
        filter: drop-shadow(0 0 8px rgba(108, 92, 231, 0.4));
    }
    to {
        filter: drop-shadow(0 0 12px rgba(108, 92, 231, 0.6));
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 悬浮特效 */
.glow-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% -20%,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-btn:hover::before {
    opacity: 1;
}

/* 按下效果 */
.glow-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 15px rgba(108, 92, 231, 0.3);
}

/* 禁用状态 */
.glow-btn:disabled {
    opacity: 0.7;
    filter: saturate(0.6);
    cursor: not-allowed;
}

/* 查看原图按钮美化 */
.view-original-btn {
    /* 基础样式 */
    position: relative;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;

    /* 渐变背景 */
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(245, 247, 250, 0.9) 100%);
    color: #4a90e2;
    border: 1px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(4px);
}

/* 悬浮效果 */
.view-original-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
    background: linear-gradient(135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(245, 247, 250, 1) 100%);
    color: #2d6db5;
}

/* 点击效果 */
.view-original-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.1);
}

/* 图标样式 */
.view-original-btn i {
    font-size: 1.1em;
    transition: transform 0.3s;
}

/* 悬浮时图标动画 */
.view-original-btn:hover i {
    transform: scale(1.1);
}

.view-original-btn:hover::after {
    transform: translate(2px, -2px);
    opacity: 1;
}

/* 禁用状态 */
.view-original-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* 移除所有默认样式残留 */
.file-input::-webkit-file-upload-button {
    visibility: hidden;
    width: 0;
    height: 0;
}

